import React from 'react'
import { Popup, Panel, Cells, Cell, CellBody,CellFooter, PopupHeader, CellHeader, Flex, FlexItem } from 'react-weui'
import SelectPopup from './ProductSelectPopup'

export default class ProductSelect extends React.Component {
	constructor(props) {
		super(props)
		this.state = {
			bottom_show: false
		}
		this.handleHide = this.handleHide.bind(this)
	}
	handleHide() {
		this.setState({
			bottom_show: false
		})
	}
	render() {
		const { goodData } = this.props;
        const shoppingCartActions  = this.props.shoppingCartActions;
	    return (
		    <Panel>
                <Cell href="javascript:;" access>
                    <CellBody onClick={e=>this.setState({bottom_show: true})}>
                        选择尺码 颜色 分类
                    </CellBody>
                    <CellFooter />
                </Cell>
                <SelectPopup
                	goodData={goodData}
                	isAdded={this.props.isAdded}
                	shoppingCartActions={shoppingCartActions}
                	goodsId={this.props.goodsId}
                	storeId={this.props.storeId}
                	bottomShow={this.state.bottom_show}
                	handleHide={this.handleHide}
               		isBar={false}
               	/>
		    </Panel>
		);
	}
}
